class Bill {
  final String amount;
  final String description;
  final String note;
  final DateTime date;

  Bill({required this.amount, required this.description, this.note = '', required this.date});

  String getFormattedDate() {
    return '${date.year}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}';
  }
  
  // bool get isIncome {
    
  //   return description.contains('收入');
  // }
  String getWeekday(DateTime dateTime) {
  final daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
  return daysOfWeek[dateTime.weekday - 1];
}
}